﻿using FreeSql.DataAnnotations;

namespace KJSyncXP.Sqlite.Model
{
    /// <summary>
    /// 权限实体类
    /// </summary>
    [Table(Name = "permission")] // 对应数据库表名
    public class Permission
    {
        /// <summary>
        /// 内部标识（主键，自增）
        /// </summary>
        [Column(Name = "id", IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 权限的全局标识
        /// </summary>
        [Column(Name = "puuid", StringLength = 120)]
        public string Puuid { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        [Column(Name = "pname", StringLength = 120)]
        public string Pname { get; set; }

        /// <summary>
        /// 权限代码
        /// </summary>
        [Column(Name = "pkey", StringLength = 100)]
        public string Pkey { get; set; }

        /// <summary>
        /// 权限类别
        /// </summary>
        [Column(Name = "ptype", StringLength = 100)]
        public string Ptype { get; set; }

        /// <summary>
        /// 权限级别
        /// </summary>
        [Column(Name = "plevel")]
        public int? Plevel { get; set; }

        /// <summary>
        /// 权限描述
        /// </summary>
        [Column(Name = "pdescription", StringLength = 120)]
        public string Pdescription { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(Name = "remark", StringLength = 150)]
        public string Remark { get; set; }

        /// <summary>
        /// 是否可用
        /// </summary>
        [Column(Name = "inuse")]
        public bool Inuse { get; set; }

        /// <summary>
        /// 是否可见
        /// </summary>
        [Column(Name = "isshow")]
        public bool Isshow { get; set; }
    }
}